const db = wx.cloud.database()
const productsCollection = db.collection('products')

Page({
    data: {
        title:''
    },

    changeFrom (e) {
        this.setData({
          title : e.detail
        })
        console.log(this.data.title);
    },
    
    Query:function(event){
        console.log(event)
        productsCollection.where({
            title:db.RegExp({
                regexp:this.data.title
            })
        }).get().then(res=>{
            this.setData({
                products: res.data
              })
        })
       
    }

})